package cn.wygandwdn.common.utils;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @description:    IP地址工具类
 * @author: WYG
 * @time: 2021/10/29 20:46
 */

public class IpAddressUtil {
    /**
     * 获取服务运行主机的IP地址
     * @return  host
     */
    public static String getHost() throws UnknownHostException {
        String host = InetAddress.getLocalHost().getHostAddress();
        return host;
    }
}
